<?php
    $titles["index"]="首页";
    $titles["test"]="彩色三角形";
    $titles["rabbit"]="小兔兔";
    $titles["snowman"]="雪人";
    $titles["snowmen"]="雪人们";
    $titles["snowmen2.0"]="雪人们2.0";
    $titles["snowmen3.0"]="雪人们3.0";

    $paths["index"]="services/index.html";
    $paths["test"]="test/test.html";
    $paths["rabbit"]="Experiment/Experiment1/rabbit.html";
    $paths["snowman"]="Experiment/Experiment2/snowman.html";
    $paths["snowmen"]="Experiment/Experiment3/snowmen.html";
    $paths["snowmen2.0"]="Experiment/Experiment4/snowmen.html";
    $paths["snowmen3.0"]="Experiment/Experiment5/snowmen.html";

    if (!$titles[$_GET["page"]]) {
        $_GET["page"] = "index";
    }
?>

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <link rel="stylesheet" type="text/css" href="css/kobo.css">
    <!--link rel="icon" href="emblem.ico" type="image/x-icon"-->
    <script src="js/jquery-3.5.1.min.js"></script>
    <title><?php echo $titles[$_GET["page"]];?> - 东画工房</title>
</head>

<body>
    <header>
        <!--div class="emblem"><img id="emblem" src="res/emblem.png"></div-->
        <div class="title"><a href="/" target="_top">东画工房</a></div>
    </header>
    <hr>
    <div class="middle">
        <div class="side-nav">
            <h2>作品目录</h2>
            <ul>
                <?php
                    foreach($titles as $s=>$name) {
                        if($s == $_GET["page"]) {
                            echo '<li><a href="?page='.$s.'" target="_top" class="now">'.$name.'</a></li>';
                        } else {
                            echo '<li><a href="?page='.$s.'" target="_top">'.$name.'</a></li>';
                        }
                    }
                ?>
            </ul>
        </div>

        <div class="contents">
            <?php include($paths[$_GET["page"]]); ?>
            
        </div>
    </div>
</body>
</html>